<%--
  User: wang_
  Date: 2025/7/14
  Time: 13:32
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<% response.setHeader("Content-Type", "text/html; charset=UTF-8"); %>
<% request.setCharacterEncoding("UTF-8"); %>
<% response.setCharacterEncoding("UTF-8"); %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!--java代码获取系统上下文路径-->
<%String path=request.getContextPath();%>
<%--JSTL获取系统上下文路径：--%>
<c:set var="ctu" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<title>导航栏</title>
	<link href="${ctu}/css/topPage.css" rel="stylesheet">
</head>
<body>
<div class="nav-logo">
	<h1>
		我的世界<span class="text-accent">MOD</span>百科
	</h1>
</div>
<div class="nav-desktop">
	<a href="${ctu}/member/wj/homepage.jsp">首页...</a>
	<a href="${ctu}/member/wj/search.html">搜索...</a>
	<a href="${ctu}/member/wj/features.html">特性...</a>
	<a href="${ctu}/member/wj/searchDevelopers.html">开发者们...</a>
	<a href="${ctu}/member/wj/searchMod.html">模组...</a>
	<a href="${ctu}/member/wj/searchIntegrationPackage.html">整合包...</a>
	<!-- 用户头像 -->
	<div class="user">
		<img alt="用户头像" class="profilePicture yes_logon" src="">
		<a href="#" class="yes_logon">[用户名]</a>
		<a href="#" class="no_logon">[登录或注册]</a>
	</div>
</div>
<button class="nav-mobile-btn" id="menu-toggle">
	<i class="fa fa-bars"></i>
</button>
<script>
    $.post(getSystemContextPath() + "/UserServlet", {
            "type": "getUserDetailed"
        },
        function (data) {
            if (data != null && data.trim() != "") {
                $(".no_logon").hide();
                $(".yes_logon").show();
            } else {
                $(".no_logon").show();
                $(".yes_logon").hide();
            }
        }
    );
</script>
</body>
</html>